#ifndef __LEDS__H__
#define __LEDS__H__

/*
 * Handware Definition
 *
 * J20		P_IRIS_CONTROL1		GPIO1_5
 * J50		JTAG_TRSTN			GPIO3_1
 */

#define DEV_NAME_KEYS "keys"

/* data bit */
#define BIT0 (1<<2)
#define BIT1 (1<<3)
#define BIT2 (1<<4)
#define BIT3 (1<<5)
#define BIT4 (1<<6)
#define BIT5 (1<<7)
#define BIT6 (1<<8)
#define BIT7 (1<<9)

#define DATA0 (1<<0)
#define DATA1 (1<<1)
#define DATA2 (1<<2)
#define DATA3 (1<<3)
#define DATA4 (1<<4)
#define DATA5 (1<<5)
#define DATA6 (1<<6)
#define DATA7 (1<<7)

/* gpio base address */
#define KEY_J20_GPIO_1_BASE 0x12141000
#define KEY_J50_GPIO_3_BASE 0x12143000
#define GPIO_MAP_SIZE    0x10000

/* gpio register offset address */
#define GPIO_DIR 0x400
#define GPIO_IS  0x404
#define GPIO_IEB 0x408
#define GPIO_IEV 0x40C
#define GPIO_IE  0x410
#define GPIO_RIS 0x414
#define GPIO_MIS 0x418
#define GPIO_IC  0x41C

/* multiplexing base address */
#define MULTI_BASE          0x12040000
#define MULTI_MAP_SIZE      0x10000

#define MULTI_KEY_J20_OFFSET	0x58
#define MULTI_KEY_J50_OFFSET	0x64



/* ioctl command */
#define GET_KEY_J20_STATUS 0x1
#define GET_KEY_J50_STATUS 0x3


/* read and write */
#define HW_REG(reg) (*((volatile unsigned int *)(reg)))

 



#endif /* __LEDS__H__ */
